const {
  Base
} = require('./base.js')

class GiftShopModel extends Base {
  constructor() {
    super()
  }
  // 首页
  getHomeModule(data) {
    return this.promiseRequest('/wechat/mall/applet/page/index', data)
  };
  // 商品分类
  getClassify(data) {
    return this.promiseRequest('/wechat/mall/applet/page/navigate/info', data)
  };
  // 热词
  getHotKeywords(data) {
    return this.promiseRequest('/wechat/mall/applet/product/hot/keywords', data, false, true)
  };
  // 查询搜索
  getSearchResult(data) {
    return this.promiseRequest('/wechat/mall/applet/product/search', data, true)
  };
  // 商品详情
  getShopDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/product/detail', data)
  };
  /**
   * 查询用户地址列表
   */
  addressList(data) {
    return this.promiseRequest('/wechat/mall/applet/user/address/list', data)
  };
  /**
   * 用户地址详情
   */
  addressDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/user/address/detail', data)
  };
  /**
   * 删除用户地址
   */
  addressDelete(data) {
    return this.promiseRequest('/wechat/mall/applet/user/address/delete', data)
  };
  /**
   * 保存用户地址
   */
  addressSave(data) {
    return this.promiseRequest('/wechat/mall/applet/user/address/save', data)
  };
  /**
   * 查询本地全部地址
   */
  areaLocalTotalInfo(data) {
    return this.promiseRequest('/wechat/mall/applet/area/local/total/info', data)
  };

  /**
   * 本地地址查询
   */
  getAreaLocalInfo(data) {
    return this.promiseRequest('/wechat/mall/applet/area/local/info', data)
  };
  /**
   * 热门城市
   */
  areaHot(data) {
    return this.promiseRequest('/wechat/mall/applet/area/hot', data)
  };

  /**
   * 查询用户手机
   */
  userPwdMobile(data) {
    return this.promiseRequest('/wechat/applet/user/pwd/mobile', data)
  };
  /**
   * 验证短信验证码
   */
  userPwdMobileAuth(data) {
    return this.promiseRequest('/wechat/applet/user/pwd/mobile/auth', data)
  };
  /**
   * 发短信验证码
   */
  userPwdSendMsg(data) {
    return this.promiseRequest('/wechat/applet/user/pwd/send/msg', data)
  };
  /**
   * 修改密码
   */
  userPwdEdit(data) {
    return this.promiseRequest('/wechat/applet/user/pwd/edit', data)
  };
  /**
   * 购物车列表
   */
  cartList(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/list', data)
  };
  /**
   *加入购物车 
   */
  cartAdd(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/add', data)
  };
  /**
   *编辑购物车 
   */
  cartEdit(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/edit', data)
  };
  /**
   *勾选购物车 
   */
  cartCheck(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/check', data)
  };
  /**
   *删除购物车 
   */
  cartDelete(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/delete', data)
  };
  /**
   *清空失效 
   */
  cartClear(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/clear', data)
  };
  /**
   *购物车数量 
   */
  cartNum(data) {
    return this.promiseRequest('/wechat/mall/applet/cart/num', data)
  };
  /**
   *结算信息 
   */
  balanceInfo(data) {
    return this.promiseRequest('/wechat/mall/applet/balance/info', data)
  };
  /**
   *提交订单 
   */
  balanceCreateOrder(data) {
    return this.promiseRequest('/wechat/mall/applet/balance/create/order', data)
  };
  /**
   *发起支付验证密码 
   */
  balanceOrderTopay(data) {
    return this.promiseRequest('/wechat/mall/applet/balance/order/topay', data)
  };

  /**
   * 订单付款
   */
  userOrderPay(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/pay', data)
  };

  /**
   * 订单列表
   */
  userOrderList(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/list', data, true)
  };

  /**
   * 取消订单
   */
  userOrderCancel(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/cancel', data)
  };

  /**
   * 订单详情
   */
  userOrderDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/detail', data)
  };

  /**
   * 子订单详情
   */
  userOrderSubDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/sub/detail', data)
  };

  /**
   * 处理中
   */
  userServiceOrderList(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/order/list', data, true)
  };
  /**
   * 申请售后列表
   */
  userOrderServiceList(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/service/list', data, true)
  };
  /**
   * 取消服务单
   */
  serviceOrderCancel(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/order/cancel', data)
  };
  /**
   * 服务单详情
   */
  serviceOrderDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/order/detail', data)
  };
  /**
   * 换货校验
   */
  serviceOrderPreCheck(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/order/pre/check', data)
  };
  /**
   * 保存服务单
   */
  serviceOrderSave(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/order/save', data)
  };
  /**
   * 上传图片
   */
  uploadImage(data) {
    return this.promiseRequest('/wechat/mall/applet/user/upload/image', data)
  };
  /**
   * 动态获取加密key
   */
  userGetKey(data) {
    return this.promiseRequest('/wechat/applet/user/get/key', data)
  };
  /**
   * 会员资产汇总查询
   */
  userAssetShop(data) {
    return this.promiseRequest('/wechat/applet/user/asset/summary/by/shopid', data)
  };
  /**
   * 售后商品列表
   */
  orderRefundGood(data) {
    return this.promiseRequest('/wechat/mall/applet/user/order/refundGood', data)
  };
  /**
   * 售后进度
   */
  serviceProgressDetail(data) {
    return this.promiseRequest('/wechat/mall/applet/user/service/progress/detail', data)
  };

}

module.exports = {
  GiftShopModel
}